package com.itheima.youdianda.common;

import lombok.Data;

/**
 * 存储当前线程用户的id
 */
@Data
public abstract class BaseContext {
    private static ThreadLocal<String> threadLocal = new ThreadLocal<>();

    public static void setId(String id){
        threadLocal.set(id);
    }

    public static String getId(){
        return threadLocal.get();
    }
}
